package com.pc.ipushpin.business.controller;

import com.pc.ipushpin.business.model.User;
import com.pc.ipushpin.business.service.IUserService;
import com.pc.ipushpin.business.service.impl.UserService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("/user")
public class UserController {

    private static Logger logger = Logger.getLogger(UserController.class);

    @Resource
    private IUserService userService;

    @RequestMapping("/addUser")
    public String addUser(HttpServletRequest request, ModelMap model) {
        User user = new User();
        user.setUsername("test");
        user.setGender(true);
        user.setNickname("测试");
        model.put("user",user);
        return "user/manager";
    }

}
